package hhm.framessm.rest.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import hhm.framessm.common.pojo.FBResult;
import hhm.framessm.rest.service.TestService;

@Controller
@RequestMapping("/test")
public class TestController {

	@Autowired
	private TestService testService;

	@RequestMapping("/write/{contentCategoryId}")
	@ResponseBody
	public FBResult write(@PathVariable Long contentCategoryId) {

		testService.add();
		return FBResult.build(200, null);
	}

	@RequestMapping("/read/{contentCategoryId}")
	@ResponseBody
	public FBResult read(@PathVariable Long contentCategoryId) {

		testService.get1();
		return FBResult.build(200, null);
	}
}